# for i in range(1, 5):
#     for j in range(1, 5):
#         for k in range(1, 5):
#             if (i != k) and (i != j) and (j != k):
#                 print(i, j, k)
# print("Hello,world")
# str='123456789'
# print(str) #输出一个字符串
# print(str[0:-1])
# print(str[0])
# print(str[2:5])
# print(str[2:])
# print(str[1:])
# 继承--------------------------------
# class Person:
#     def __init__(self,name,age):
#         self.name=name
#         self.__age=age
#     def say_age(self):
#         print(self.name,"的年龄是:",self.__age)
#
# class Student(Person):
#     def __init__(self,name,age,score):
#         Person.__init__(self,name,age)#调用父类
#         self.score=score
#     def say_score(self):
#         print(self.name,"的成绩是:",self.score)
# s = Student("张飞", 18, 90)
# s.say_age()
# s.say_score()
# print(s.name)
# print(s._Person__age)
#------------------------------------------------

#方法的重写
# class Person:
#     def __init__(self,name,age):
#         self.name=name
#         self.age=age
#     def say_age(self):
#         print("我的年龄是:{0}".format(self.age))
#     def say_name(self):
#         print("我的名字是:{0}".format(self.name))
# class Student(Person):
#
#     def __init__(self,name,age):
#         Person.__init__(self,name,age)
#     def say_age(self):
#         '''重写父类方法'''
#         print("报告大哥，我的年龄是:{0}".format(self.age))
# s=Student("张飞",18)
# s.say_age()
# s.say_name()

